/*
 * Things to highlight in the example:
 * 1. type can be any combination
 * 2. access part by t._N
 */

package helloscala.practise.chapter2

object TupleShower {
  def tupleator(x1: Any, x2: Any, x3: Any) = (x1, x2, x3)

  def createTuple: Unit = {
    val t = tupleator("Jeff", 13, 3.3)
    println("whole tuple: " + t)
    println("1st tuple: " + t._1)
    println("2nd tuple: " + t._2)
    println("3rd tuple: " + t._3)

    val (t1, t2, t3) = tupleator("World", '!', 0x22)
    println(t1 + " " + t2 + " " + t3)
  }
}
